from __future__ import absolute_import
import os
import logging

from forest.registry import register_tool
from forest.tool import Tool

logger = logging.getLogger('tools.system.mkdir')

        
@register_tool('system.mkdir')
def mkdir(dst):
    '''unsuprisingly, this creates a directory at dst'''
    logger.debug("Create Directory: %s" % dst) 
    try:
        os.makedirs(dst)
    except OSError:
        pass
    assert os.path.isdir(dst), "Could not create %s" % dst
    return dst
